import Vue from 'vue'
import App from './App.vue'
import router from './router'
import './plugins/element.js'
//引入全局样式表
import './assets/CSS/global.css'
//引入字体图标库
import './assets/fonts/iconfont.css'


//引入axios
import axios from 'axios'
//配置到全局对象下
Vue.prototype.$http= axios
//配置请求路径
axios.defaults.baseURL='http://www.ysqorz.top:8888/api/private/v1/'

//设置请求拦截
axios.interceptors.request.use(config =>{
  //最后必须要返回config
  //设置Authorization
  config.headers.Authorization = window.sessionStorage.getItem('token')
  return config
})

Vue.config.productionTip = false

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
